package com.zone.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zone.demo.domain.entity.Myuser;
import com.zone.demo.domain.mapper.MyuserMapper;
import com.zone.demo.service.minIntTestService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class minIntTestServiceImpl extends ServiceImpl<MyuserMapper,Myuser> implements minIntTestService{

    /**
    * Description 最小整数
    * @author le
    * @date 2021/7/11 13:34
    * @return int
    */

    @Override
    public int minInt(List<Integer> args){
        int min = args.get(0);
        for (int item : args){
            min = min <= item ? min :item;
        }
        return min;
    }
}
